package com.job.meidi;

/**
 * @author angzhijin
 * @Description
 * @create 2022-09-19 8:57 PM
 */
import java.util.*;
public class Meidi0919 {
    public static void main(String[] args) {
        B(args);
    }

    public static void A(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] points = new int[2][n];
        for (int i = 0; i < n; i++) {
            points[0][i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            points[1][i] = sc.nextInt();
        }
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            for (int j = i+1; j < n; j++) {
                int x = points[0][i]-points[0][j];
                int y = points[1][i]-points[1][j];
                min = Math.min(min, x*x + y*y);
            }
        }
        System.out.printf("%.4f", Math.sqrt(min));
    }

    public static void B(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        double[] nums = new double[n];
        double max = 0;
        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextDouble();
            max = Math.max(max,nums[i]);
        }
        if(k==1){
            System.out.printf("%.2f",max);
            return;
        }
        double r = max;
        double l = 0;
        double res = l;
        int count =0;
        while (r-l>0.005){
            double mid = (l+r)/2;
            count = 0;
            for (int i = 0; i < n; i++) {
                count += nums[i]/mid;
            }
            if(count<k)r = mid;
            else l = mid;
            res = mid;
        }
        count = 0;
        for (int i = 0; i < n; i++) {
            count += nums[i]/res;
        }
        if(count<k)res -= 0.01;
        else res+= 0.01;
        System.out.printf("%.2f",res);
    }

    public static void C(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        sc.nextLine();
        char[] s = sc.nextLine().toCharArray();
        char[] t = sc.nextLine().toCharArray();

        int[][] dp = new int[n+1][m+1];
        for (int i = 1; i <= n; i++) {
            char ch = s[i-1];
            for (int j = 1; j <= m; j++) {
                char ch2 = t[j-1];
                if(ch ==ch2){
                    dp[i][j] = dp[i-1][j-1] +1;
                }else{
                    dp[i][j] = Math.max(dp[i-1][j], dp[i][j-1]);
                }
            }
        }
        System.out.println(dp[n][m]);
    }
}
